var express = require('express');
var gooddb = require('../model/productSchema');
var router = express.Router();

router.get("/getProducts",function (req,res) {
  res.header("Access-Control-Allow-Origin","*");
  res.header("Access-Control-Allow-Headers","X-Requested-With");
  res.header("Access-Control-Allow-Methods","PUT,POST,GET,DELETE,OPTIONS");
  gooddb.findAll({},function(data) {
    res.json(data);
  })
  });
module.exports = router;
